package com.joysuch.wwyt.bp.bean.inspect;

import com.alibaba.fastjson.JSONObject;
import com.google.gson.JsonArray;
import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;
import com.joysuch.wwyt.util.StringUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.List;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * 巡检-检查点详情-设备列表信息
 */
@Data

public class BPInspectPointDetailBean implements Serializable {

    public BPInspectPointDetailBean(){}

    public BPInspectPointDetailBean(Long id, String inspectItem, Long inspectPointId, String inspectStandard,
                                    String deviceBrand, String deviceName, Long deviceId, String inspectItemIds){
        this.id = id;
        this.inspectPointId = inspectPointId;
        this.deviceBrand = deviceBrand;
        this.deviceName = deviceName;
        this.deviceId = deviceId;
        if(!StringUtil.isEmpty(inspectItem)){
            this.inspectItem = JSONObject.parseArray(inspectItem, String.class);;
        }
        if(!StringUtil.isEmpty(inspectStandard)){
            this.inspectStandard = JSONObject.parseArray(inspectStandard, String.class);;
        }
        if(!StringUtil.isEmpty(inspectItemIds)){
            this.inspectItemIds = JSONObject.parseArray(inspectItemIds, String.class);;
        }

    }

    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("设备ID")
    private Long deviceId;

    @ApiModelProperty("检查项目列表文本")
    private List<String> inspectItem;

    @ApiModelProperty("检查项目类型ID列表")
    private List<String> inspectItemIds;

    @ApiModelProperty("检查标准列表文本")
    private List<String> inspectStandard;

    @ApiModelProperty("检查记录-检查结果集合")
    private List<String> inspectResult;

    @ApiModelProperty("检查记录-检查状态集合")
    private List<String> inspectResultStatus;

    @ApiModelProperty("设备名称")
   private String deviceName;

    @ApiModelProperty("设备型号")
   private String deviceBrand;

    @ApiModelProperty("检查点主表ID")
    private Long inspectPointId;

    @ApiModelProperty("定位方式位置")
    private String locationType;



}
